import request from '@/utils/request'
/*
  获取企业列表
*/
export function getWeCorpList(data: any) {
  return request({
    url: '/api/corp/wechat/list',
    method: 'post',
    data,
  })
}
/*
  获取所有授权企业
*/
export function getWechatAll(data: any) {
  return request({
    url: '/api/corp/wechat/all',
    method: 'post',
    data,
  })
}
/*
  获取客服列表
*/
export function getWeComList(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/list',
    method: 'post',
    data,
  })
}
/*
  添加客服
*/
export function addWeCom(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/add',
    method: 'post',
    data,
  })
}
/*
  复制客服
*/
export function setWeComCopyKf(data: any) {
  return request({
    url: '/api/replace/wechat/kf/copy',
    method: 'post',
    data,
  })
}
/*
  删除企业微信客服
*/
export function doWeComDelete(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/delete',
    method: 'post',
    data,
  })
}
/*
  上传临时素材
*/
export function uploadWeCom(data: any) {
  return request({
    url: '/api/corp/wechat/upload/media',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
    },
  })
}
/*
  获取临时素材
*/
export function getWeComMedia(data: any) {
  return request({
    url: '/api/corp/wechat/get/media',
    method: 'post',
    data,
  })
}
/*
  设置客服欢迎语
*/
export function setWeComMsg(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/set/welcome',
    method: 'post',
    data,
  })
}
/*
  设置客服关键字
*/
export function setWeComKeyWord(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/set/keyword',
    method: 'post',
    data,
  })
}
/*
  获取客服欢迎语
*/
export function getWeComMsg(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/get/welcome',
    method: 'post',
    data,
  })
}
/*
  获取客服关键字
*/
export function getWeComKeyWord(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/get/keyword',
    method: 'post',
    data,
  })
}
/*
  删除客服关键字
*/
export function doWeComKeyWordDel(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/del/keyword',
    method: 'post',
    data,
  })
}
/*
  获取客服消息类型
*/
export function getWeComType() {
  return request({
    url: '/api/corp/wechat/kf/account/msg/type',
    method: 'post',
  })
}
/*
  获取客服链接
*/
export function getWeComKfLink(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/link',
    method: 'post',
    data,
  })
}
/*
  设置客服推送消息
*/
export function setWeComKfPush(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/set/push',
    method: 'post',
    data,
  })
}
/*
  获取客服推送消息
*/
export function getWeComKfPush(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/get/push',
    method: 'post',
    data,
  })
}
/*
  删除客服推送消息
*/
export function doWeComPushDel(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/del/push',
    method: 'post',
    data,
  })
}
/*
  获取客服默认回复
*/
export function getWeComKfDefault(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/get/default',
    method: 'post',
    data,
  })
}
/*
  设置客服默认回复
*/
export function setWeComKfDefault(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/set/default',
    method: 'post',
    data,
  })
}
/*
  获取部门成员列表
*/
export function getWeComUserList(data: any) {
  return request({
    url: '/api/replace/wechat/get/user/list',
    method: 'post',
    data,
  })
}
/*
  获取客服接待列表
*/
export function getWeComServicerList(data: any) {
  return request({
    url: '/api/replace/wechat/get/servicer/list',
    method: 'post',
    data,
  })
}
/*
  添加客服接待
*/
export function setWeComKfServicer(data: any) {
  return request({
    url: '/api/replace/wechat/add/servicer',
    method: 'post',
    data,
  })
}
/*
  删除客服接待
*/
export function doWeComServicerDel(data: any) {
  return request({
    url: '/api/replace/wechat/del/servicer',
    method: 'post',
    data,
  })
}
/*
  获取推荐书籍列表
*/
export function getWeComBookList(data: any) {
  return request({
    url: '/api/replace/wechat/get/book/list',
    method: 'post',
    data,
  })
}
/*
  设置推荐书籍
*/
export function setWeComBook(data: any) {
  return request({
    url: '/api/replace/wechat/set/book',
    method: 'post',
    data,
  })
}
/*
  删除推荐书籍
*/
export function doWeComBookDel(data: any) {
  return request({
    url: '/api/replace/wechat/del/book',
    method: 'post',
    data,
  })
}
/*
  获取书包
*/
export function getWeComBookPack() {
  return request({
    url: '/api/replace/wechat/get/book/package',
    method: 'post',
  })
}
/*
  设置客服书包
*/
export function setWeComBookPack(data: any) {
  return request({
    url: '/api/replace/wechat/set/kf/book/package',
    method: 'post',
    data,
  })
}
/*
  获取客服书包
*/
export function getWeComKfPack(data: any) {
  return request({
    url: '/api/replace/wechat/get/kf/book/package',
    method: 'post',
    data,
  })
}
/*
  获取客户列表
*/
export function getWeComCustList(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/customer/list',
    method: 'post',
    data,
  })
}
/*
  获取客服数据统计
*/
export function getWeComStatisticList(data: any) {
  return request({
    url: '/api/replace/wechat/kf/statistic',
    method: 'post',
    data,
  })
}
/*
  获取客服推送时间
*/
export function getPushTime(data: any) {
  return request({
    url: '/api/corp/wechat/kf/get/push/time',
    method: 'post',
    data,
  })
}
/*
  设置客服定时消息推送
*/
export function setTimePush(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/set/timing/push',
    method: 'post',
    data,
  })
}
/*
  获取客服定时消息推送
*/
export function getTimePush(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/get/timing/push',
    method: 'post',
    data,
  })
}
/*
  删除客服定时消息推送
*/
export function delTimePush(data: any) {
  return request({
    url: '/api/corp/wechat/kf/account/del/timing/push',
    method: 'post',
    data,
  })
}
